"一些可能要改的设置

function s:cmake_compile_commands()
	if empty(glob('CMakeLists.txt'))
		echo "Can't find CMakeLists.txt"
		return
	endif
	if empty(glob('.vscode'))
		execute 'silent !mkdir .vscode'
	endif
	execute '!cmake -DCMAKE_BUILD_TYPE=debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -S. -B .vscode'
endfunction
command! -nargs=0 Gc :call s:cmake_compile_commands()

function s:make_compile_commands()
	if empty(glob('Makefile'))
		echo "Can't find Makefile"
		return
	endif
	if empty(glob('.vscode'))
		execute 'silent !mkdir .vscode'
	endif
	echo "Here !!!"
	" execute '!cd .vscode'
	echo "Here !!!"
	execute '!make clean; bear make'
endfunction
command! -nargs=0 Gm :call s:make_compile_commands()

